import React from 'react'
import { useNavigate } from 'react-router-dom'
export default function Header() {
  const navigate = useNavigate()
  function Gogo() {
    navigate(1)
  }
  function Back() { 
    navigate(-1)
  }
  return (
    <div className="row">
      <div className="col-xs-offset-2 col-xs-8">
        <button onClick={Back}>《back</button><div className="page-header"><h2>React Router Demo</h2></div><button onClick={Gogo}>go》</button>
      </div>
    </div>
  )
}
